-module(tester).

-define(COMPILER_OPTIONS,[]).

-define(EXPORT_PREFIX,"-methods([").
-define(EXPORT_SUFFIX,"]).").
-define(METHOD_ARITY,1).

-define(PRELOAD_REQUIRED,).

-include("../tester.hrl").


call_method(Object, Method) ->
    try
        {ok, Object:Method()}
    catch
        error:undef ->
            method_not_found
    end.

create_object(Class) ->
    Class:new().

% delete_object(_) ->
%     ok.

load_class(Class) ->
    ImplModule = list_to_atom( atom_to_list(Class)++"_impl1"),
    code:purge(ImplModule), code:delete(ImplModule),
    ect:load(ImplModule, mode1).

switch_class(Class) ->
    load_class(Class).


get_class_module(Class) ->
    Class.